1. Field of the Invention
The present invention relates to an entropy coding apparatus for efficiently entropy-coding still images or moving images.
2. Related Background Art
As conventional compression coding technology for still images and moving images, an entropy coding technology utilizing runlength/category coding technology and variable length coding are well known.
As these technologies, a Joint Photographic Experts Group (JPEG) coding system and a Moving Picture Experts Group (MPEG) coding system which are international standards are well known.
Both these coding systems utilize an orthogonal transformation coding system and executes a quantization process for orthogonal transformation coefficients generated after the orthogonal transformation. A stream of quantized orthogonal transformation coefficients (quantized coefficients) is arranged in a zigzag scan order and subjected to RrunLength (RL)/category encoding to obtain symbol data.
Strictly speaking, although runlength/category encoding is slightly different between JPEG and MPEG coding systems, it is analogous in that a quantized coefficient having a value other than 0 and the number of consecutive quantized coefficients having a value of 0 and preceding the first mentioned quantized value are used as a group to be subjected to runlength coding.
FIG. 2 shows an entropy coding apparatus using conventional technology.
The entropy coding apparatus shown in FIG. 2 receives (inputs) a stream of quantized orthogonal transformation coefficients and outputs variable length coding data. This entropy coding apparatus is constituted of a runlength/category encoding unit 205 and a variable length encoding unit 206.
For example, in realizing the JPEG coding system by using this entropy coding apparatus, the runlength/category encoding unit 205 generates runlength (symbol RRRR) and category (symbol SSSS) which are symbol data, and addition bits.
The variable length encoding unit 206 variable-length encodes symbol data by referring to a Huffman table to generate variable length encoding data.
In FIG. 2 it is assumed that a stream of quantized orthogonal transformation coefficients input to the entropy coding apparatus becomes a JPEG coding data stream at the succeeding stage.
The size of image data capable of being processed by various image systems is recently becoming very large because of improvement on the data transfer capacity of a communication network and high density of storage devices. Processing image data of high quality is therefore made in many cases.
A coding apparatus for compressing such image data is therefore required to provide compression coding at a high bit rate.
The number of pixels of an image read sensor is increasing in the field of digital cameras, digital video, copying machines, printers and the like to obtain image data.
The coding apparatus is therefore required to operate at a high throughput. A function is also required which makes the size of variable length coding data generated through compression as small as possible.
An entropy coding apparatus according to conventional technology cannot provide a sufficient throughput in a system requiring a high bit rate process and a system mounted with a sensor for a large number of pixels.
If the capacity of a storage device for storing variable length coding data generated by the coding apparatus is small so that the upper limit size of variable length coding data is determined in advance and if the variable length coding data initially generated by the apparatus exceeds the upper limit size, it is necessary to execute again the compression process by using another quantization table (a quantization table having large values as a whole).
In such a case, the time taken to compress image data becomes long.